<div id="content" class="clearfix">
    <div class="contentwrapper"><!--Content wrapper-->
        <div class="heading"></div><!-- End .heading-->
        <div class="row-fluid">
          <div class="offset1 span8">
            <div class="page-header">
              <h1>Log Downloader </h1>
            </div><!--close header-->
            <div class="row">
                <div class="offset2 span8">
                    <div class="well">
                        <p align="center">AppScale is in the process of gathering your deployment logs. Depending on the number of
                            nodes you are deployed upon this operation may take up to one minute.</p>
                        <br />
                        <div id="btn-msg" align="center"><small>A button will appear once the logs have been gathered.</small></div>
                        <div id="log-download-btn" align="center" style="display:none;"><a class="btn btn-primary btn-large" href='/download-logs/{{ uuid }}.tar.gz'>Click to Download</a></div>
                    </div>
                </div>
            </div>
          </div>
        </div> <!-- end row fluid -->
    </div> <!-- end content wrapper -->
</div> <!--end content-->

<script>
  setInterval(function() {
    $.ajax({
      type: "GET",
      url: "/download-logs/{{ uuid }}.tar.gz",
      statusCode: {
        200: function() {
          $('#btn-msg').hide();
          $('#log-download-btn').show();
        }
      }
    })
  }, 5000);
</script>
